package com.zsrt.exam.entity;


/**
 * 
 * @author My
 *
 */
public class UserEntity implements Comparable<UserEntity> {
	
	private double total;
	
	

	public void setTotal(double total) {
		this.total = total;
	}

	private String card;
	
	private String name;
	
	private String password;
	
	private int age;
	
	private String province;
	
	private String city;
	
	private String phone;
	
	private int chinese;
	
	private int math;
	
	private int enghish;
	
	private String role;
	
	private int other;

	public String getCard() {
		return card;
	}

	public void setCard(String card) {
		this.card = card;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public int getChinese() {
		return chinese;
	}

	public void setChinese(int chinese) {
		this.chinese = chinese;
	}

	public int getMath() {
		return math;
	}

	public void setMath(int math) {
		this.math = math;
	}

	public int getEnghish() {
		return enghish;
	}

	public void setEnghish(int enghish) {
		this.enghish = enghish;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public int getOther() {
		return other;
	}

	public void setOther(int other) {
		this.other = other;
	}
	
	/**
	 * 获得总分
	 * @return
	 */
	public int getTotal(){
		return chinese+math+enghish+other;
	}

	@Override
	public String toString() {
		return "考生 [card=" + card + ", name=" + name + ", password=" + password + ", age=" + age + ", province="
				+ province + ", city=" + city + ", phone=" + phone + ", chinese=" + chinese + ", math=" + math
				+ ", enghish=" + enghish + ", role=" + role + ", other=" + other + "]";
	}

	@Override
	public int compareTo(UserEntity o) {
		return this.getTotal()-o.getTotal();
	}

	
	
}
